(function () {
  let myChart = echarts.init(document.querySelector(".a1"));

  let option = {
    // 加水印
    graphic: [
      {
        type: "text",
        top: "45%",
        left: "38%",
        style: {
          text: "523",
          fill: "#fff",
          color: "#fff",
          fontSize: 15,
          fontWeight: "bold",
        },
      },
      {
        type: "text",
        top: "54%",
        left: "36%",
        style: {
          text: "占比54%",
          fill: "#A6A8B6",
          fontSize: 8,
          fontWeight: "normal",
        },
      },
    ],
    grid: {
      left: 100,
      bottom: 8,
    },
    series: [
      {
        type: "pie",
        //   radius: '50%',
        radius: [30, 35],
        center: ["50%", "50%"],
        label: {
          show: false,
        },
        startAngle: 100,
        data: [
          {
            value: 90,
            itemStyle: {
              color: "#6abaf2",
            },
          },
          {
            value: 30,
            itemStyle: {
              color: "rgb(56, 67, 123)",
            },
          },
        ],
      },
    ],
  };

  myChart.setOption(option);
  window.addEventListener("resize", () => {
    myChart.resize();
  });
})();
